f22e005e4c25a182e5c8cf04d052972fe94f1431,Manager/src/main/java/com/rainbow/kam/ble_gatt_manager/manager/GattManager.java,GattManagerCallBack,onDescriptorWrite,#BluetoothGatt#BluetoothGattDescriptor#number#,451

Before Change


        @Override
        public void onDescriptorWrite(BluetoothGatt bluetoothGatt, BluetoothGattDescriptor descriptor, int status) {
            BluetoothGattCharacteristic characteristic = descriptor.getCharacteristic();
            if (status == BluetoothGatt.GATT_SUCCESS) {
                if (currentNotificationCharacteristic != null && characteristic.equals(currentNotificationCharacteristic)) {
                    notificationSubject.onNext(new GattObserveData(currentNotificationCharacteristic, STATE_ON_START));
                }
                if (currentIndicationCharacteristic != null && characteristic.equals(currentIndicationCharacteristic)) {
                    indicationSubject.onNext(new GattObserveData(currentIndicationCharacteristic, STATE_ON_START));
                }
            } else {

After Change




        @Override
        public void onDescriptorWrite(BluetoothGatt bluetoothGatt, BluetoothGattDescriptor descriptor, int status) {
            BluetoothGattCharacteristic characteristic = descriptor.getCharacteristic();
            if (isGattStatusSuccess(status)) {
                if (isCharacteristicAvailable(characteristic, currentNotificationCharacteristic)) {
                    notificationSubject.onNext(new GattObserveData(currentNotificationCharacteristic, STATE_ON_START));
                }
                if (isCharacteristicAvailable(characteristic, currentIndicationCharacteristic)) {
                    indicationSubject.onNext(new GattObserveData(currentIndicationCharacteristic, STATE_ON_START));
                }
            } else {